package jp.sourceforge.akjrcp.text_douga;

import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;

public class ImageObject {
	private String filePath;
	private BufferedImage img;
	
	public ImageObject(BufferedImage img){
		this.img=img;
	}
	public ImageObject(String filePath){
		this.filePath=filePath;
	}
	public BufferedImage getImage() throws IOException{
		if(img==null){
			img=ImageIO.read(new File(filePath));
		}
		return img;
	}
}
